$OpenBSD: patch-Makefile,v 1.1.1.1 2017/04/15 12:53:02 jasper Exp $

Add bsd_auth(3) support.

--- Makefile.orig	Sun Mar 26 15:01:23 2017
+++ Makefile	Fri Apr 14 19:44:10 2017
@@ -1,4 +1,5 @@
 TOPDIR=$(shell pwd)
+UNAME=$(shell uname)
 
 INSTALL=install
 PREFIX=/usr
@@ -16,9 +17,15 @@ CFLAGS += -Wall
 CPPFLAGS += -D_GNU_SOURCE
 CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-dpms xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
 LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-dpms xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
-LIBS += -lpam
 LIBS += -lev
 LIBS += -lm
+
+# OpenBSD lacks PAM, use bsd_auth(3) instead.
+ifeq ($(UNAME),OpenBSD)
+  CPPFLAGS += -DUSE_BSDAUTH
+else
+  LIBS += -lpam
+endif
 
 FILES:=$(wildcard *.c)
 FILES:=$(FILES:.c=.o)
